package xing.application.api;

import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import xing.infrastructure.util.HttpHelper;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/*******************************************************************************************
 * 类描述：  
 *
 * @author: dustin
 * @date： 2017-8-16 9:29
 * @Description:
 * @version 1.0.0
 *
 *
 * Version    Date       ModifiedBy                 Content  
 * -------- ---------    ----------         ------------------------  
 * 1.0.0     2017-8-16    Administrator                            
 *******************************************************************************************
 */
public class Client {
    static final String BASE_URL = "https://oapi.dingtalk.com/";

    public static String postCommand(String command, Map<String,String> paras, Map<String,String> headers) throws IOException
    {
        String res= HttpHelper.jsonPost(BASE_URL+command,paras,headers);
        return res;
    }
    public static String getCommand(String command,String paras){

        String res=HttpHelper.sendGet(BASE_URL.concat(command),paras);
        return res;
    }

}
